/*
 * @Author: 前端一理 1041123705@qq.com
 * @Date: 2023-11-22 14:03:20
 * @LastEditors: 前端一理 1041123705@qq.com
 * @LastEditTime: 2024-01-18 09:15:17
 * @FilePath: \react\src\router\index.jsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createHashRouter, Navigate } from "react-router-dom";
import Login from "../views/login/login";
// 路由首字母大写 否则会警告报错
import GetData from "../views/getdata";

const router = createHashRouter([
  {
    path: "/",
    element: <Login />,
  },
  {
    path: "/getdata",
    element: <GetData />,
  },
  {
    path: "*",
    element: <Navigate to="/" />, // 重定向到登录页
  },
]);

export default router;
